package cc.lj.internal.coupons.interfaces.dto.command;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Range;
import org.springframework.validation.annotation.Validated;

import javax.validation.constraints.Min;
import java.math.BigDecimal;

/**
 * 新增封顶额活动批次表Command
 * @author liangxifeng
 * @date 2021-12-13
 */
@Data
@NoArgsConstructor
@Validated
@ApiModel("新增封顶额活动批次表--Command")
public class InsertCapBatchCommand {
    /**
     * 关联券批次ticket_batch主键
     */
    @ApiModelProperty(value = "关联券批次ticket_batch主键")
    @Min(value=1,message = "关联电子券批次表主键必须>=1的数字")
    private Integer	batchId;

    /**
     * 关联商户封顶额mart_cap表主键
     */
    @ApiModelProperty(value = "关联商户封顶额mart_cap表主键")
    @Min(value=1,message = "关联商户封顶额表主键必须>=1的数字")
    private Integer	capId;

    /**
     * 占有卖场封顶额的比例，不可为空，默认0
     */
    @ApiModelProperty(value = "占有卖场封顶额的比例")
    @Range(min = 1,max = 100,message = "封顶额占比必须是>=1且<=100的数字")
    private BigDecimal martCapRatio;

    /**
     * 达到卖场封顶额后是否设置新分摊:0否,1是,默认1
     */
    @ApiModelProperty(value = "达到卖场封顶额后是否设置新分摊")
    @Range(min = 0,max = 1,message = "达到卖场封顶额后是否设置新分摊必须>=0或<=1")
    private Integer	isNewShare;

    /**
     * 商户新分摊比例
     */
    @ApiModelProperty(value = "商户新分摊比例")
    private BigDecimal	merchantShare;

    /**
     * 卖场新分摊比例
     */
    @ApiModelProperty(value = "卖场新分摊比例")
    private BigDecimal	martShare;

    /**
     * 商户分摊金额
     */
    @ApiModelProperty(value = "商户分摊金额")
    private BigDecimal	merchantPrice;

    /**
     * 卖场分摊金额
     */
    @ApiModelProperty(value = "卖场分摊金额")
    private BigDecimal	martPrice;
}
